package com.cirkana.viewer.route.gpx;

import java.util.Date;

import com.cirkana.CirkanaUtil;

public class TrackPoint {

	private Double lat;
	private Double lon;
	private Double ele;
	private Date time;

	protected TrackPoint() {
	}

	protected TrackPoint(Double lat, Double lon, Double ele, Date time) {
		this.lat = lat;
		this.lon = lon;
		this.ele = ele;
		this.time = time;
	}

	public Double getLat() {
		return lat;
	}

	public void setLat(Double lat) {
		this.lat = lat;
	}

	public Double getLon() {
		return lon;
	}

	public void setLon(Double lon) {
		this.lon = lon;
	}

	public Double getEle() {
		return ele;
	}

	public void setEle(Double ele) {
		this.ele = ele;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public static TrackPoint getTrackPoint() {
		return new TrackPoint();
	}

	public static TrackPoint getTrackPoint(Double lat, Double lon, Double ele,
			Date time) {
		return new TrackPoint(lat, lon, ele, time);
	}

	@Override
	public String toString() {
		StringBuilder s = new StringBuilder();
		s.append("trackPoint={lat=" + Double.toString(lat));
		s.append(",lon=" + Double.toString(lon));
		s.append(",ele=" + Double.toString(ele));
		s.append(",time=" + CirkanaUtil.dateFormat.format(time) + "}");
		return s.toString();
	}

}
